<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" xmlns:th="http://www.thymeleaf.org/">
    <title>Title</title>
</head>
<script>
    function add() {
        alert("增加成功!");
    }
</script>
<body>
<table border="1">
    <tr>
        <td>成绩单编号</td>
        <td>学生学号</td>
        <td>课程号</td>
        <td>成绩</td>
        <td>操作</td>
    </tr>
    <tr th:each="concat:${sc}">
        <td th:text="${concat.scoreno}"></td>
        <td th:text="${concat.sno}"></td>
        <td th:text="${concat.cno}"></td>
        <td th:text="${concat.score}"></td>
        <td>
            <a  th:href="@{'/sc/getById/'+${concat.scoreno}}">修改</a>
            <a  th:href="@{'/sc/delete/'+${concat.scoreno}}">删除</a>
        </td>
    </tr>
</table>
<div>
    <title>成绩录入</title>
    <form action="/sc/addScore"method="post">
        输入学生编号: <input type="text" th:value="${sno}" name="sno"><br>
        课程编号: <input type="text" th:value="${cno}" name="cno"><br>
        成绩: <input type="text" th:value="${score}" name="score"><br>
        <button  onclick="add()" type="submit">录入成绩</button>
    </form>
</body>
</html>